package cn.ehanghai.htz.common.constants;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ReturnCode {

    /**错误码*/
    private Integer code;
    /**提示信息*/
    private String msg;
    /**具体内容*/
    private Object data;


    public ReturnCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static  ReturnCode success(Object T){
        ReturnCode returnCode=new ReturnCode(200,"成功");
        returnCode.setData(T);
        return returnCode;
    }

    public static ReturnCode success(){
        return success(null);
    }


}
